SafetyResponsibilityBookArchivesView = Ext.extend(Ext.Panel, {
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        SafetyResponsibilityBookArchivesView.superclass.constructor.call(this, {
            id : "SafetyResponsibilityBookArchivesView",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel,all.yearGridTreePanel]
        });
    },
    initUIComponents : function() {
         var yearGridComponents=new createyeargridview({
            topbar : {
                //inputFormName : '',
                topbarAdd:{
                    hidden:true
                },
                topbarDel:{
                    hidden:true
                }
            },
            search : {
                items : [ {
                    style : "margin:5px 5px 5px 5px;",
                    text : "责任书编号"
                }, {
                    columnWidth : 0.2,
                    xtype : "textfield",
                    name : "Q_responBookNo_S_LK",
                    maxLength : 256
                } ]
            },
            grid : {
                title : "已存档安全责任书列表",
                rowActions:false,
                listUrl : __ctxPath + "/saferesponsibility/listSafetyResponsibilityBook.do",
                removeUrl : __ctxPath + "/saferesponsibility/deleteSafetyResponsibilityBook.do",
                fields : [ "id", 'years','institution','responBookNo', "responBookName", "responBookGrade", "suitStation","examiner","status","effectiveStartDate","effectiveEndDate"],
                columns : [ {
                    header : "id",
                    dataIndex : "id",
                    hidden : true
                },  {
                    header : "责任书编号",
                    dataIndex : "responBookNo",
                    width : 100
                }, {
                    header : "责任书名称",
                    dataIndex : "responBookName",
                    width : 70
                }, {
                    header : "责任书级别",
                    dataIndex : "responBookGrade",
                    width : 70
                }, {
                    header : "适用岗位",
                    dataIndex : "suitStation",
                    width : 100
                },{
                    header:"状态",
                    dataIndex:"status",
                    width:100,
                    renderer:function(){
                        return "已存档";
                    }
                },{
                    header : "确认记录",
                    dataIndex : "id",
                    sortable : false,
                    width : 50,
                    renderer : function(j, i, g, m, h) {
                        var cfg={
                                /*weixianzuoyeId : g.data.id,
                                zuoyebianhao : g.data.zuoYeBianHao,
                                zuoyemingcheng : g.data.zuoYeMingCheng*/
                        }
                        var k = "";
                                k += '<button title="查看" value="" class="btn-showDetail" onclick=\'SafetyResponsibilityBookArchivesView.chakan('
                                    + JSON.stringify(cfg) + ')\'></button>';
                        return k;
                    }
                }],
                
            },
            tree : {
                treeUrl : __ctxPath + "/saferesponsibility/treeLoadSafetyResponsibilityBook.do"
            }
            
        });
        return yearGridComponents;
    }
});
SafetyResponsibilityBookArchivesView.chakan=function(){   
    alert("全部确认完成！！")
}